package cn.ml.mybatisdemo.dao;

import cn.ml.mybatisdemo.entity.ParamObj;
import cn.ml.mybatisdemo.entity.Person;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface PersonDao {
    //@Insert("insert into person (name,sex) values (#{name},#{sex})")
    public List<Person> list();
    public List<Person> list2(Map params); //传入参数进行查询
    public List<Person> list3(ParamObj paramObj);
    public List<Person> list4(@Param("likeName") String likeName,@Param("sex") String sex); //给参数起别名,别名对应xml中sql语句传入的值
    public List<Person> list5();
    public void save(Person person);
    public boolean update(Person person);
    public boolean update2(Person person);
    public boolean update3(Person person);
    public boolean delete();
}
